﻿/* 枚举管理样式 */

#enum-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#enum-panel .panel-header {
    flex-shrink: 0;
}

#enum-panel .enum-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 枚举编辑器头部 */
.enum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    flex-shrink: 0;
}

.enum-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.enum-header-actions {
    display: flex;
    gap: 10px;
}

/* 分栏编辑器 */
.enum-editor .split-editor {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow: hidden;
}

/* 左侧边栏 - 枚举文件列表 */
.enum-files-search-container {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

.enum-files-search-container input {
    padding-right: 35px;
}

.enum-files-search-container .search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    pointer-events: none;
}

.enum-files-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.enum-file-list-item {
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.enum-file-list-item:hover {
    border-color: #27ae60;
    background: #f0fff4;
}

.enum-file-list-item.active {
    border-color: #27ae60;
    background: #e8f8f0;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.enum-file-list-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.enum-file-list-item-desc {
    font-size: 12px;
    color: #7f8c8d;
}

/* 右侧主编辑区域 */
.enum-content-editor {
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.enum-content-editor .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.enum-content-editor .empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.enum-content-editor .empty-state p {
    font-size: 16px;
    margin: 0;
}

/* 基本信息网格 */
.enum-basic-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.enum-basic-info-grid .form-group-full {
    grid-column: 1 / -1;
}

/* 枚举值容器 */

/* 枚举值容器 */
.enum-values-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.enum-values-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.enum-values-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.enum-values-actions {
    display: flex;
    gap: 8px;
}

.enum-values-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: none;
    overflow-y: visible;
    padding: 0;
    background: transparent;
    border: none;
    margin-bottom: 15px;
}

.enum-value-item {
    display: grid;
    grid-template-columns: 150px 100px 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.enum-value-item .form-group {
    margin: 0;
}

.enum-value-item label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.enum-value-item input {
    width: 100%;
}

.enum-value-item .btn-delete {
    margin-top: 22px;
}

/* 枚举预览 */
.modal-content-large {
    max-width: 800px;
    width: 90%;
}

.enum-preview-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 15px 0;
}

.enum-preview-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.enum-preview-key {
    font-weight: 600;
    min-width: 120px;
}

.enum-preview-value {
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    min-width: 80px;
}

.enum-preview-binary {
    font-family: 'Courier New', monospace;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.enum-preview-binary span {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.enum-preview-binary .bit-1 {
    background: #2ecc71;
    color: white;
}

.enum-preview-binary .bit-0 {
    background: #e74c3c;
    color: white;
}

.enum-preview-label {
    color: #95a5a6;
    font-style: italic;
}

/* 事件枚举样式 */
.event-enum-item {
    width: 100%;
}

.event-enum-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.event-enum-row .form-group {
    flex: 1;
    margin: 0;
}

.event-params-group {
    flex: 1 !important;
}

.event-params-list {
    margin-bottom: 8px;
    min-height: 40px;
    padding: 6px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.empty-params {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 6px;
    font-size: 12px;
}

.event-param-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr auto;
    gap: 6px;
    margin-bottom: 6px;
    padding: 6px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.event-param-item input {
    font-size: 12px;
    padding: 4px 8px;
}

.event-param-item .param-key {
    grid-column: 1;
}

.event-param-item .param-type {
    grid-column: 2;
}

.event-param-item .param-desc {
    grid-column: 3;
}

.event-param-item button {
    grid-column: 4;
    height: 100%;
    padding: 2px 6px;
    font-size: 11px;
}

.enum-value-item:has(.event-enum-item) {
    grid-template-columns: 1fr auto;
    padding: 10px;
}

.enum-value-item:has(.event-enum-item) .btn-delete {
    margin-top: 0;
    align-self: flex-start;
}

/* 事件枚举的紧凑样式调整 */
.event-enum-item label {
    font-size: 11px;
    margin-bottom: 2px;
    color: #6c757d;
    font-weight: 500;
}

.event-enum-item input,
.event-enum-item textarea {
    font-size: 12px;
}

.event-enum-item textarea {
    resize: vertical;
    min-height: 50px;
}

.event-enum-item .btn {
    font-size: 11px;
    padding: 4px 8px;
}

